<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Simple Django Blog</title>

    <!-- Load our color and font preferences -->
    <link rel=StyleSheet href="/scripts/style.css" TYPE="text/css">
   
    <!-- Load MochiKit and our own JavaScript -->
    <script type="text/javascript" src="/scripts/MochiKit/MochiKit.js">
    </script>
    <script type="text/javascript" src="/scripts/dblog.js"> 
    </script>
  </head>

  <body>
    <h1>
      <div class="title">
         {{ object.title }}
      </div>
    </h1>
    <hr>
    <div class="content">
      <p>Published on {{object.post_date|date:"F j, Y"}}</p>
      <p>Posted by {{object.reply_to}}</p>
      <p>Current rating is {{object.rating}} out of 5</p>

      <div class="blogtext">
        {{object.content}}
      </div>
    </div>
 
     <hr>
    <div class="footer">
      <div id="comment_view_area">
        View <a href="javascript:viewComments({{object.id}})">
        {{object.comment_set.count}} 
        comment{{object.comment_set.count|pluralize}}</a><br/>
      </div>
      Return to <a href="/simpleblog">Top</a><br/>

      <script type="text/javascript">
        var rating_choices = Array({{object.RATING_CHOICES|length}} + 1)
        {% for r in object.RATING_CHOICES %}
          rating_choices[{{r.0}}] = "{{r.1}}";
        {% endfor %}
      </script> 
      {% if user.is_authenticated %}
        <script type="text/javascript">var is_authenticated = 1;</script> 
        <p><a href="/accounts/logout">Logout {{user.username }}.</a></p>
      {% else %}
        <script type="text/javascript">var is_authenticated = 0;</script> 
        <p><a href="/accounts/login">Login </a>here</p>
        <p><a href="/accounts/newUser">Create new account </a>here</p>
      {% endif %}
    </div>
  </body>
</html>
 
 
 
 